
cmake_minimum_required(VERSION 3.4.1)

#包含头文件
include_directories(src/main/cpp/include/)

#通配实现包含多个文件进来，通配只能使用file命令
#file(GLOB ed_src "src/main/cpp/src/encrypt/*.*")

#源文件文件夹
set(SRC src/main/cpp/src)
#工具模块
set(UTILS ${SRC}/utils)
#MD5模块源代码
set(ed_md5 ${SRC}/encrypt/md5/ed_md5.c)
#SHA1模块源代码
set(ed_sha ${SRC}/encrypt/sha/ed_sha1.c)

#AES对称加密模块源代码
set(ed_aes ${SRC}/encrypt/aes/ed_aes.c
         ${SRC}/encrypt/aes/ed_base64.c
         ${SRC}/encrypt/aes/ssl_aes.c)

#AES-POLARSSL对称加密模块源代码
set(ed_polarssl_aes ${SRC}/encrypt/aes/ed_base64.c
         ${SRC}/encrypt/aes/ssl_aes.c)

#AES-POLARSSL测试
#set(ed_polarssl_aes_test ${SRC}/encrypt/aes/ssl_aes.c ${SRC}/encrypt/aes/test.c )

#文件操作模块源代码
set(ed_file ${UTILS}/transform.c ${SRC}/file/ed_fop.c )
#其他个相关源文件
set(ed_other ${UTILS}/transform.c ${SRC} ${SRC}/encrypt/ed_signature.c ${SRC}/encrypt/aes/ed_base64.c)

set(ed_src ${SRC}/encrypt/ed.c  ${ed_other} ${ed_md5} ${ed_file})

add_library(white SHARED  ${ed_src})

#add_library(md5 SHARED  ${ed_md5})

#add_library(sha1 SHARED  ${ed_sha})

#add_library(aes SHARED  ${ed_aes})

#add_library(polarssl_aes SHARED  ${ed_polarssl_aes})

#add_library(polarssl_aes_test SHARED  ${ed_polarssl_aes_test})

#add_library(file SHARED ${ed_file})

find_library(log-lib log)

target_link_libraries(
                       white
                       ${log-lib} )